package com.flexycore.iphone.launch;


import java.util.Vector;

import com.flexycore.iphone.controllers.FirstViewController;
import com.flexycore.iphone.controllers.SecondViewController;
import com.flexycore.iphone.controllers.TabBarController;
import com.flexycore.iphone.uikit.UIApplication;
import com.flexycore.iphone.uikit.UIApplicationDelegate;
import com.flexycore.iphone.uikit.UIScreen;
import com.flexycore.iphone.uikit.UIViewController;
import com.flexycore.iphone.uikit.UIWindow;



public class Launcher extends UIApplicationDelegate {
	
	public Launcher()
	{
	}
	
	public void applicationDidFinishLaunching(UIApplication app)
	{ 
		UIWindow window = new UIWindow();
		window.initWithFrame(UIScreen.mainScreen().bounds());
		
		FirstViewController firstViewController = new FirstViewController();
		SecondViewController secondViewController = new SecondViewController();
		
		Vector<UIViewController> v = new Vector<UIViewController>();
		v.add(firstViewController);
		v.add(secondViewController);
		
		TabBarController tabBarController = new TabBarController();
		tabBarController.setViewControllers(v);
		
		window.addSubview(tabBarController.view());
		window.makeKeyAndVisible();
	}
	
}
